<php>
	$this->display(tpl('head',true)); 
	$is_upphoto[$settingDB['is_upphoto']]='checked';
	$is_upinsertvideo[$settingDB['is_upinsertvideo']]='checked';
	$is_upfile[$settingDB['is_upfile']]='checked';
</php>
	<style>
		.layui-form-checkbox {
		    margin-top: 10px;
		}
	</style>
	<fieldset class="layui-elem-field layui-field-title">
	  	<legend>Ueditor百度编辑器参数设置</legend>
	</fieldset>
	<form class="layui-form" method="post">
		<table class="layui-table  my-tabel">
			<tbody>
				<tr>
					<td>百度APPkey</td>
					<td>
						<input type="text" class='layui-input my-input' name="ueditor[appkey]" value="{{$settingDB['appkey'] }}"  placeholder="百度APPkey"/>
						如果需要此功能请到http://app.baidu.com/ 申请
					</td>
				</tr>
				<tr>
					<td>前台用户是否有上传图片权限</td>
					<td>
						<input type="radio" name="ueditor[is_upphoto]" value="1" {{$is_upphoto[1] }} title="允许" />
						<input type="radio" name="ueditor[is_upphoto]" value="0" {{$is_upphoto[0] }} title="不允许" />
					</td>
				</tr>
				<tr>
					<td>前台用户是否有上传视频权限</td>
					<td>
						<input type="radio" name="ueditor[is_upinsertvideo]" value="1" {{$is_upinsertvideo[1] }} title="允许" />
						<input type="radio" name="ueditor[is_upinsertvideo]" value="0" {{$is_upinsertvideo[0] }} title="不允许" />
					</td>
				</tr>
				<tr>
					<td>前台用户是否有上传附件权限</td>
					<td>
						<input type="radio" name="ueditor[is_upfile]" value="1" {{$is_upfile[1] }} title="允许" />
						<input type="radio" name="ueditor[is_upfile]" value="0" {{$is_upfile[0] }} title="不允许" />
					</td>
				</tr>
				<tr>
					<td>前台需要显示的功能</td>
					<td>
						<php>
						$settingDB['function']=unserialize($settingDB['function']);
						foreach($uedtior_config as $k=>$v){
							$checked='';
							if(in_array($k,(array)$settingDB['function'])){
								$checked='checked';
							}
						</php>
						<dl id="{{$k }}" style="float: left;">
							<input type="checkbox" name="ueditor[function][]" {{$checked }} value="{{$k }}" title="{{$v }}" />
						</dl>
						<php> } </php>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="my_button">
						<input type="hidden" name="step" id="step" value="post" />
						<button class="layui-btn">立即设置</button>
					</td>
				</tr>
			</tbody>
		</table>
	</from>
	<script>
		
		layui.config({
			version: '{{NOWTIME }}'
		});
		layui.use(['form'], function(){
		  	var $ = layui.jquery
			var form = layui.form;
		});
	</script>
<php> $this->display(tpl('foot',true)); </php>
